<template>
    <!-- 主题类型：视频 -->
    <div class="list-video-component-item">
        <router-link class="list-video-component-img"
                     :to="{name: info.content.isSmallVideo==1?'MiniVideo':'Video', params: {channelid: info.content.channelId, videoid: info.contentId}}">
            <!-- 视频的封面部分 -->
            <img v-if="info.content.stills"
                 v-lazy="info.content.stills" :key="info.content.stills"/>
            <img v-else src="../assets/images/live_default.png"/>
            <div class="list-video-component-img-btn" v-if="isBig">
                <img src="../assets/images/play.png"/>
            </div>
            <!--<div class="list-video-component-img-time">-->
            <!--<span v-if="info.content.vLength">{{this.getVideoTime(info.content.vLength)}}</span>-->
            <!--<span v-if="info.content.videoDuration">{{this.getVideoTime(info.content.videoDuration)}}</span>-->
            <!--</div>-->
        </router-link>
        <router-link class="list-video-component-title"
                     :to="{name: info.content.isSmallVideo==1?'MiniVideo':'Video', params: {channelid: info.content.channelId, videoid: info.contentId}}">
            <span v-if="info.content.name">{{info.content.name}}</span>
            <span v-if="info.content.contentName">{{info.content.contentName}}</span>
        </router-link>
        <router-link class="list-video-component-info"
                     :to="{name: 'Index', params: {channelid: info.content.channelId}}">
            <div class="list-video-component-info-name">
                {{info.content.displayTime && this.toCommonTime(info.content.displayTime)}}
            </div>
            <div class="list-video-component-info-num">{{this.simpleNum(info.content.viewCount)}}看过</div>
            <div class="clearBoth"></div>
        </router-link>
    </div>
</template>

<script>
    export default {
        props: {
            info: {
                type: Object,
                default: function () {
                    return {};
                }
            },
            isBig: {
                type: Boolean,
                default: true
            }
        }
    }
</script>

<style>
    .list-video-component-item {
        padding: 0.4rem 0;
        margin: 0.4rem auto;
        border-bottom: 0.06rem solid #EDEDED;
    }

    .list-video-component-title {
        display: block;
        font-size: 0.9rem;
        line-height: 1.0rem;
        max-height: 2.0rem;
        color: #4A4A4A;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        /*white-space: nowrap;*/
        text-decoration: none;
    }

    .list-video-component-img {
        display: block;
        width: 100%;
        padding-bottom: 56.25%;
        position: relative;
        margin: 0.3rem auto;
    }

    .list-video-component-img img {
        width: 100%;
        height: 100%;
        position: absolute;
        left: 0;
        top: 0;
        object-fit: cover;
    }

    .list-video-component-img-btn {
        position: absolute;
        width: 3.2rem;
        height: 3.2rem;
        left: 50%;
        top: 50%;
        margin-left: -1.6rem;
        margin-top: -1.6rem;
    }

    .list-video-component-btn img {
        width: 100%;
    }

    /*.list-video-component-img-time {*/
    /*position: absolute;*/
    /*padding: 0 0.3rem;*/
    /*height: 1.4rem;*/
    /*background-color: #000;*/
    /*opacity: 0.7;*/
    /*color: #FFF;*/
    /*font-size: 0.9rem;*/
    /*line-height: 1.4rem;*/
    /*text-align: center;*/
    /*border-radius: 0.4rem;*/
    /*right: 0.4rem;*/
    /*bottom: 0.4rem;*/
    /*}*/

    .list-video-component-info {
        display: block;
        font-size: 0.64rem;
        line-height: 1.4rem;
        color: #999999;
    }

    .list-video-component-info-name {
        float: left;
        width: 66%;
        color: #B3B3B3;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .list-video-component-info-num {
        float: right;
        width: 34%;
        text-align: right;
    }
</style>